﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FIRDetails.aspx.cs" Inherits="FIRDetails" MasterPageFile="~/MasterPage.master"%>


<asp:Content ID="content1" runat="server" ContentPlaceHolderID="MainContentPlaceHolder">

    <div style="text-align: center">
      <table width="800" border="0" cellspacing="0" cellpadding="0" style="background-color:#ffffff">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>
              <table cellpadding="0" cellspacing="0" 
                  style="width: 718px; vertical-align: top; background-color: #C0C0C0;">
                  <tr>
                      <td class="style1" style="vertical-align: top">
                          <table cellpadding="0" cellspacing="0" style="width: 174px; height: 111px;">
                              <tr>
                                  <td>
                                      <a href= "AddDistrict.aspx"> District Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="AddCircle.aspx"> Circle Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href= "AddPoliceStation.aspx"> PoliceStation Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                               <a href="anonymous/GenerateFIR.aspx"> GenerateFIR </a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="WitnessDetails.aspx">Witness Details</a></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <a href="AddMurderDetail.aspx">Murder Record</a></td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" 
                                        style="width: 538px; background-color: #FFFFCC;">
                                        <tr>
                                            <td colspan="2">
                                                <asp:Label ID="Label1" runat="server" BackColor="#666699" ForeColor="White" 
                                                    SkinID="Label1" style="font-weight: 700; font-style: italic; font-size: large" 
                                                    Text="FIR Details" Width="520px"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: left" colspan="2">
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                                    ConnectionString="<%$ ConnectionStrings:PAS_DB %>" 
                                                    DeleteCommand="DELETE FROM [FirTab] WHERE [FIRNo] = @FIRNo" 
                                                    InsertCommand="INSERT INTO [FirTab] ([FIRNo], [fName], [lName], [gender], [citizenIDType], [citizenID], [fathersName], [addLine1], [addLine2], [addCity], [addState], [zipCode], [mobile], [phone], [email], [report], [TCode]) VALUES (@FIRNo, @fName, @lName, @gender, @citizenIDType, @citizenID, @fathersName, @addLine1, @addLine2, @addCity, @addState, @zipCode, @mobile, @phone, @email, @report, @TCode)" 
                                                    SelectCommand="SELECT * FROM [FirTab]" 
                                                    UpdateCommand="UPDATE [FirTab] SET [fName] = @fName, [lName] = @lName, [gender] = @gender, [citizenIDType] = @citizenIDType, [citizenID] = @citizenID, [fathersName] = @fathersName, [addLine1] = @addLine1, [addLine2] = @addLine2, [addCity] = @addCity, [addState] = @addState, [zipCode] = @zipCode, [mobile] = @mobile, [phone] = @phone, [email] = @email, [report] = @report, [TCode] = @TCode WHERE [FIRNo] = @FIRNo">
                                                    <DeleteParameters>
                                                        <asp:Parameter Name="FIRNo" Type="Int32" />
                                                    </DeleteParameters>
                                                    <UpdateParameters>
                                                        <asp:Parameter Name="fName" Type="String" />
                                                        <asp:Parameter Name="lName" Type="String" />
                                                        <asp:Parameter Name="gender" Type="String" />
                                                        <asp:Parameter Name="citizenIDType" Type="Int32" />
                                                        <asp:Parameter Name="citizenID" Type="String" />
                                                        <asp:Parameter Name="fathersName" Type="String" />
                                                        <asp:Parameter Name="addLine1" Type="String" />
                                                        <asp:Parameter Name="addLine2" Type="String" />
                                                        <asp:Parameter Name="addCity" Type="String" />
                                                        <asp:Parameter Name="addState" Type="String" />
                                                        <asp:Parameter Name="zipCode" Type="String" />
                                                        <asp:Parameter Name="mobile" Type="String" />
                                                        <asp:Parameter Name="phone" Type="String" />
                                                        <asp:Parameter Name="email" Type="String" />
                                                        <asp:Parameter Name="report" Type="String" />
                                                        <asp:Parameter Name="TCode" Type="Int32" />
                                                        <asp:Parameter Name="FIRNo" Type="Int32" />
                                                    </UpdateParameters>
                                                    <InsertParameters>
                                                        <asp:Parameter Name="FIRNo" Type="Int32" />
                                                        <asp:Parameter Name="fName" Type="String" />
                                                        <asp:Parameter Name="lName" Type="String" />
                                                        <asp:Parameter Name="gender" Type="String" />
                                                        <asp:Parameter Name="citizenIDType" Type="Int32" />
                                                        <asp:Parameter Name="citizenID" Type="String" />
                                                        <asp:Parameter Name="fathersName" Type="String" />
                                                        <asp:Parameter Name="addLine1" Type="String" />
                                                        <asp:Parameter Name="addLine2" Type="String" />
                                                        <asp:Parameter Name="addCity" Type="String" />
                                                        <asp:Parameter Name="addState" Type="String" />
                                                        <asp:Parameter Name="zipCode" Type="String" />
                                                        <asp:Parameter Name="mobile" Type="String" />
                                                        <asp:Parameter Name="phone" Type="String" />
                                                        <asp:Parameter Name="email" Type="String" />
                                                        <asp:Parameter Name="report" Type="String" />
                                                        <asp:Parameter Name="TCode" Type="Int32" />
                                                    </InsertParameters>
                                                </asp:SqlDataSource>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style3">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:DetailsView ID="DetailsView2" runat="server" AllowPaging="True" 
                                                    AutoGenerateRows="False" CellPadding="4" DataKeyNames="FIRNo" 
                                                    DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
                                                    Height="50px" Width="293px">
                                                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                                    <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
                                                    <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                                    <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
                                                    <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                                                    <Fields>
                                                        <asp:BoundField DataField="FIRNo" HeaderText="FIRNo" ReadOnly="True" 
                                                            SortExpression="FIRNo" />
                                                        <asp:BoundField DataField="fName" HeaderText="fName" SortExpression="fName" />
                                                        <asp:BoundField DataField="lName" HeaderText="lName" SortExpression="lName" />
                                                        <asp:BoundField DataField="gender" HeaderText="gender" 
                                                            SortExpression="gender" />
                                                        <asp:BoundField DataField="citizenIDType" HeaderText="citizenIDType" 
                                                            SortExpression="citizenIDType" />
                                                        <asp:BoundField DataField="citizenID" HeaderText="citizenID" 
                                                            SortExpression="citizenID" />
                                                        <asp:BoundField DataField="fathersName" HeaderText="fathersName" 
                                                            SortExpression="fathersName" />
                                                        <asp:BoundField DataField="addLine1" HeaderText="addLine1" 
                                                            SortExpression="addLine1" />
                                                        <asp:BoundField DataField="addCity" HeaderText="addCity" 
                                                            SortExpression="addCity" />
                                                        <asp:BoundField DataField="addState" HeaderText="addState" 
                                                            SortExpression="addState" />
                                                        <asp:BoundField DataField="zipCode" HeaderText="zipCode" 
                                                            SortExpression="zipCode" />
                                                        <asp:BoundField DataField="mobile" HeaderText="mobile" 
                                                            SortExpression="mobile" />
                                                        <asp:BoundField DataField="email" HeaderText="email" 
                                                            SortExpression="email" />
                                                        <asp:BoundField DataField="report" HeaderText="report" 
                                                            SortExpression="report" />
                                                    </Fields>
                                                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                                    <AlternatingRowStyle BackColor="White" />
                                                </asp:DetailsView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                &nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
            </td>
        </tr>
        </table>
    </div>

</asp:Content>